package ar.com.ctrln.control.mantenimiento.ticket;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import ar.com.ctrln.persistence.model.ticket.Ticket;
import ar.com.ctrln.services.ticket.GestorTicket;

@Controller("verEditarTicket")
public class VerEditarTicket {

	@Autowired
	private GestorTicket gestorTicket;
	
	public List<Ticket> listaTicket() {
		return gestorTicket.listarTickets();
	}
	
	////////Metodo de Filtrado(falta terminar)///////////
	public List<Ticket> filtrar() {
		return gestorTicket.listarTickets();
	}
	
	////////Actualiza al editar y al cancelar Ticket////////
	public void actualizarTicket(Ticket ticket) {
		gestorTicket.actualizar(ticket);
		}
	
	public Ticket getTicketxId(long id) {
		return gestorTicket.getTicket(id);
		}
	
}

